Skip to content

Add Preview access to repository settings and document how previews are found - #452

Merged
nambok merged 2 commits into
mainfrom
preview-access-settings
Nov 18, 2026
Merged

nambok merged 2 commits into
mainfrom
preview-access-settings

Conversation

@nambok

@nambok nambok commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

This is the dashboard side of CoderHelm/coderhelm-platform#772. It adds one Settings item, Preview access, for the two things only a team can give: the preview's address when nothing publishes it, and the secret a protected preview takes. It also adds a docs page describing how previews are found, how long they are waited on, and how protection is handled.

Changes

  • PreviewAccessDialog (Settings, Repositories, Preview access on each enabled repository, admins only):
    • Address template. Checked as you type: it must start with https://, use only known placeholders, and name the pull request, because a fixed address is refused.
    • Protection kind. Not protected, a header (up to two name and value pairs), a query parameter, or a user name and password.
    • Secrets. Entered in masked inputs and never shown again. A saved secret is kept only while the kind stays the same.
  • api.ts:
    • getPreviewAccess, savePreviewAccess and deletePreviewAccess;
    • the PreviewAccess and PreviewAccessInput types.
  • Docs:
    • a new page, concepts/previews.mdx, covering where the preview is read from, the order it is trusted in, monorepos, waiting, the protection kinds and how the secret is handled, the template placeholders, and the GitHub App permissions it needs;
    • a nav entry for that page;
    • a release note.

Verification

  • e2e/preview-access.spec.ts covers:
    • an admin saving a template and a header secret, with the PUT body checked and the secret not shown on reopen;
    • a fixed address refused before saving;
    • members seeing no button;
    • no horizontal scroll at 375px and 1440px.
  • The new spec and e2e/staging-cms.spec.ts (same page) pass: 8 passed.
  • tsc --noEmit passes, and npm run lint passes (UI lint and the hosted-link check).

…re found

A per-repository dialog holds the preview's address template and one
sealed secret (header lines, query parameters or a password) for a
protected preview; the secret is never shown again. The new Pull request
previews page describes every place a preview is read from, how long it
is waited on, how protection is handled and the template's placeholders.
@nambok
nambok merged commit 5cca114 into main Nov 18, 2026
10 checks passed
@nambok
nambok deleted the preview-access-settings branch November 18, 2026 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant